{% extends "package/read_base.html" %}

{% block primary_content_inner %}
  {{ super() }}
  {% block package_description %}
    {% if pkg.private %}
      <span class="dataset-private label label-inverse pull-right">
        <i class="fa fa-lock"></i>
        {{ _('Private') }}
      </span>
    {% endif %}
    {% block package_archive_notice %}
      {% if is_activity_archive %}
        <div class="alert alert-danger">
          {% trans url=h.url_for('dataset.read', id=pkg.id) %}
          You're currently viewing an old version of this dataset. To see the
          current version, click <a href="{{ url }}">here</a>.
          {% endtrans %}
        </div>
      {% endif %}
    {% endblock %}
    <h1>
      {% block page_heading %}
        {{ h.dataset_display_name(pkg) }}
        {% if pkg.state.startswith('draft') %}
          [{{ _('Draft') }}]
        {% endif %}
        {% if pkg.state == 'deleted' %}
          [{{ _('Deleted') }}]
        {% endif %}
      {% endblock %}
    </h1>
    {% block package_notes %}
      {% if pkg.notes %}
        <div class="notes embedded-content">
          {{ h.render_markdown(h.get_translated(pkg, 'notes')) }}
        </div>
      {% endif %}
    {% endblock %}
    {# FIXME why is this here? seems wrong #}
    <span class="insert-comment-thread"></span>
  {% endblock %}

  {% block package_resources %}
    {% snippet "package/snippets/resources_list.html", pkg=pkg, resources=pkg.resources, is_activity_archive=is_activity_archive %}
  {% endblock %}

  {% block package_tags %}
    {% snippet "package/snippets/tags.html", tags=pkg.tags %}
  {% endblock %}

  {% block package_additional_info %}
    {% snippet "package/snippets/additional_info.html", pkg_dict=pkg %}
  {% endblock %}

{% endblock %}
